import logging,yagmail
from datetime import datetime
def Log():
    time=datetime.now().strftime("%Y%m%d_%H%M%S")
    logging.basicConfig(level=logging.DEBUG,filemode="a+",filename=f"baidufirstpagewebtestlog{time}.txt",format="%(levelname)s -> %(filename)s -> %(message)s -> %(lineno)d")
def send_mail(info):
    mail=yagmail.SMTP(user="264325917@qq.com",password="sxdpqvizcmxsbjjb",host="smtp.qq.com")
    mail.send(to="264325917@qq.com",subject="百度WebFirstPage Ui自动化测试报告",contents="今日报告，请查看",attachments=info)
